import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const Props = () => import("../pages/Props");
const EmitEvent = () => import("../pages/EmitEvent");
const VModel = () => import("../pages/VModel");
const Sync = () => import("../pages/Sync");
const Attrs = () => import("../pages/Attrs");
const Ref = () => import("../pages/Ref");
const ChildParent = () => import("../pages/ChildParent");
const Root = () => import("../pages/Root");
const Slot = () => import("../pages/Slot");

const router = new VueRouter({
  mode: "history",
  routes: [
    { path: "/props", component: Props },
    { path: "/emitevent", component: EmitEvent },
    { path: "/vmodel", component: VModel },
    { path: "/sync", component: Sync },
    { path: "/attrs", component: Attrs },
    { path: "/ref", component: Ref },
    { path: "/childparent", component: ChildParent },
    { path: "/root", component: Root },
    { path: "/slot", component: Slot },
  ],
});

export default router;
